package com.region.http.client.request;

import com.region.core.annotation.Region;
import com.region.http.client.annotation.configurer.Asynchronous;
import com.region.http.client.annotation.request.GetUrl;
import com.region.http.client.pool.AsyncParameterCallable;

import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;

@Region(value = "https://${default.url:127.0.0.1:9999}/springmvc")
public interface AsyncRequest {

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    Map<String, Object> getHealthNoFuture();

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    Future<Map<String, Object>> getHealth();

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    Future getHealthNoGeneric();

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    void getHealthNoReturn();

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    CompletableFuture<Map<String, Object>> getHealthWithCompletable();

    @Asynchronous
    @GetUrl(value = "/actuator/health")
    CompletableFuture<Map<String, Object>> getHealthWithCompletableWithParameter(AsyncParameterCallable callable);


    @Asynchronous
    @GetUrl(value = "/actuator/health")
    Map<String, Object> getHealthWithParameter(AsyncParameterCallable callable);


    @Asynchronous
    @GetUrl(value = "/actuator/health")
    Future<Map<String, Object>> getHealthWithFutureWithParameter(AsyncParameterCallable callable);
}
